Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] update variable values to include name conversion #301

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

burn2delete
Copy link

No description provided.

@burn2delete burn2delete mentioned this pull request Jan 20, 2024
@lukasoppermann
Copy link
Owner

Hey @burn2delete,

thanks for the PR. Sorry for the late reply, I was on vacation. Could you please write me a quick description of what this PR does?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7591706637

  • -11 of 18 (38.89%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 66.55%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/transformer/standardTransformer.ts 0 1 0.0%
src/utilities/changeNotation.ts 2 3 66.67%
src/utilities/getVariables.ts 5 14 35.71%
Files with Coverage Reduction New Missed Lines %
src/utilities/getVariables.ts 2 22.54%
Totals Coverage Status
Change from base Build 7178369965: 0.1%
Covered Lines: 498
Relevant Lines: 728

💛 - Coveralls

@matthova
Copy link

@lukasoppermann I pulled down this branch locally and confirmed it's working as expected (at least for me).

Could you please write me a quick description of what this PR does?

This PR appears to be patching the desired behavior, as called out here.
// Only add mode if there's more than one where the mode'd name was not included when there are two or more modes.

Before

(with Figma Token and Typography selected)

{
  "collectionname": {
    "color1": { ⚠️ modes are skipped
      "type": "color",
        "value": "#494c5bff",
        "blendMode": "normal"
      },
    }
  },
  "typography": {
    ...
  }
}

After

(with Figma Token and Typography selected)

{
  "collectionname": {
    "light_mode": { ✅ modes are back
      "color1": {
        "type": "color",
          "value": "#494c5bff",
          "blendMode": "normal"
        },
      }
    },
    "dark_mode": {
      "color1": {
        "type": "color",
          "value": "#b5bac9ff",
          "blendMode": "normal"
        },
      }
    },
  },
  "typography": {
    ...
  }
}

This plugin is great. IMO it's the cleanest. If this can get patched, it will become my "go-to" plugin. Currently using the fork locally, but this has got to be a common painpoint

@lukasoppermann
Copy link
Owner

Hey @matthova,

thanks for checking it out. We need to update this as there are conflicts. Once done we can merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants